#include "PDTListOfStatements.h"
#include "PDTCodeGraph.h"

void PDTListOfStatements::addStatement(PDTStatement &newStatement){

	addChild(&newStatement);
	newStatement.addParent(this);
}

PDTListOfStatements::PDTListOfStatements(PDTCodeGraph & CG):PDTStatement(CG){
}

PDTListOfStatements::PDTListOfStatements(PDTCodeGraph & CG,PDTStatement & newStatement):PDTStatement(CG){
    addStatement(newStatement);
}

PDTListOfStatements::PDTListOfStatements(PDTCodeGraph & CG,vector <PDTStatement*> &statementList):PDTStatement(CG){
	int size=statementList.size();
	for (int i=0 ; i<size; i++ )
	{
		addWriter(statementList[i]);
		writers[i]->addReader(this);
		addChild(statementList[i]);
		writers[i]->addParent(this);
	}
}

